cmake_minimum_required(VERSION 3.0)

project(algorithmtest)

set (CMAKE_CXX_STANDARD 17)

find_package(log4cplus)
include_directories(. 
                      ../common
                      ${CMAKE_INSTALL_PREFIX}/include
                    )

add_definitions(-DPROJECT_NAME="${PROJECT_NAME}")

file(GLOB common_src ../common/*.h ../common/*.cc)
file(GLOB leetcode_src ./leetcode/*.h ./leetcode/*.cc)
file(GLOB algorithm_src ./algorithm/*.h ./algorithm/*.cc)
add_executable(algorithmtest 
    ${leetcode_src}  
    ${algorithm_src}  
    ${common_src}
    main.cc)
target_include_directories(algorithmtest PUBLIC ./syntax)

message("log4cplus:  " ${log4cplus})


target_link_libraries(algorithmtest gtest log4cplus::log4cplus)


install(TARGETS algorithmtest
  RUNTIME DESTINATION bin
)
